package rjp;

import java.io.IOException;

import rjp.map.CachingSantaMap;
import rjp.map.SantaMap;
import rjp.mutation.MakeALongestMutation;
import rjp.solution.Solution;
import rjp.solver.OrderedSolver;
import rjp.solver.RandomSegmentMoveSolver;
import rjp.solver.Solver;

public class RJPTest {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		SantaMap map = new CachingSantaMap("santa_cities.csv", 20);
		Solution solution=new Solution(map, "sweeptest20.csv");
		//Solution solution=(new OrderedSolver()).solve(map);
		
		for(int i=0; i<10000; i++)
		{
			RandomSegmentMoveSolver s=new RandomSegmentMoveSolver(map,solution);
			s.setNumberOfSteps(1000000);
			solution=s.solve(map);
			System.out.println(solution.getScore()+" "+solution.getLenghtA()+" "+solution.getLenghtB());
		}
		
//		System.out.println("santa map");
//		//Solution s=new Solution(map, "local6_20.csv");
//		Solution s=(new OrderedSolver()).solve(map);
//		System.out.println(s.isLegal());
//		System.out.println(s.getScore());
	}

}
